<?php

namespace app\admin\model;

use think\Model;

class YWithdrawals extends Model
{
    // 表名
    protected $name = 'y_withdrawals';
    
    // 自动写入时间戳字段
    protected $autoWriteTimestamp = false;

    // 定义时间戳字段名
    protected $createTime = false;
    protected $updateTime = false;
    
    // 追加属性
    protected $append = [
    ];
    
    public function getStatusAttr($value)
    {
        switch ($value){
            case 0;
                return '待确认';
                break;
            case 1:
                return '已确认';
                break;
            case 2:
                return '已转账';
                break;
            case 3:
                return '转账中';
                break;
            case 4:
                return '转账失败';
                break;
            default:
                return '-';
                break;
        }
    }
    
    public function getChannelAttr($value)
    {
        switch ($value){
            case 0;
                return '支付宝';
                break;
            case 1:
                return '微信';
                break;
            case 2:
                return '银行转账';
                break;
            default:
                return '-';
                break;
        }
    }



}
